package com.crawler.crawler.controller;

import com.alibaba.fastjson.JSON;
import com.crawler.crawler.domain.Book;
import com.crawler.crawler.domain.BookImportConfig;
import com.crawler.crawler.service.BookImportConfigServer;
import com.crawler.crawler.service.BookService;
import com.crawler.crawler.service.SobookCrawlerServer;
import com.crawler.crawler.util.FileDownload;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;
import org.mybatis.spring.annotation.MapperScan;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.TimeUnit;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

@Controller
@MapperScan("com.crawler.crawler.mapper")
public class SobookCrawlerController {



    @Autowired
    private SobookCrawlerServer sobookCrawlerServer;


    @GetMapping("/sobook")
    @ResponseBody
    public String sobook(){
       return sobookCrawlerServer.sobook();
    }


}
